import '../base/BaseBean.dart';

//首页 商品
class RecommendGoods  implements BaseJsonBean{
  String? productId;
  String? name;
  String? pic;
  int? width;
  int? high;
  int? sale;
  double? price;
  String? unit;
  String? saleStr;
  int? newStatus;
  int? productType;
  String? askPrice;
  int? isAskPriceFlag;

  RecommendGoods(
      {this.productId,
        this.name,
        this.pic,
        this.width,
        this.high,
        this.sale,
        this.price,
        this.unit,
        this.saleStr,
        this.newStatus,
        this.productType,
        this.askPrice,
        this.isAskPriceFlag});

  RecommendGoods.fromJson(Map<String, dynamic> json) {
    productId = json['productId'];
    name = json['name'];
    pic = json['pic'];
    width = json['width'];
    high = json['high'];
    sale = json['sale'];
    price = (json['price'] as num).toDouble();
    unit = json['unit'];
    saleStr = json['saleStr'];
    newStatus = json['newStatus'];
    productType = json['productType'];
    askPrice = json['askPrice'];
    isAskPriceFlag = json['isAskPriceFlag'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['productId'] = this.productId;
    data['name'] = this.name;
    data['pic'] = this.pic;
    data['width'] = this.width;
    data['high'] = this.high;
    data['sale'] = this.sale;
    data['price'] = this.price;
    data['unit'] = this.unit;
    data['saleStr'] = this.saleStr;
    data['newStatus'] = this.newStatus;
    data['productType'] = this.productType;
    data['askPrice'] = this.askPrice;
    data['isAskPriceFlag'] = this.isAskPriceFlag;
    return data;
  }

  @override
  String toString() {
    return 'RecommendGoods{productId: $productId, name: $name, pic: $pic, width: $width, high: $high, sale: $sale, price: $price, newStatus: $newStatus, productType: $productType, isAskPriceFlag: $isAskPriceFlag}';
  }
}
